/* History Page Icon Fixes */

/* Ensure consistent button styling in history items */
.ldr-history-item-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 5;
}

.ldr-history-item-actions button,
.ldr-history-item-actions .btn {
    position: relative;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    min-height: 32px;
    min-width: auto;
    white-space: nowrap;
}

/* Consistent icon sizing and visibility */
.ldr-history-item-actions button i,
.ldr-history-item-actions .btn i,
.ldr-history-item-actions .fas,
.ldr-history-item-actions .far {
    font-size: 0.875rem;
    width: 1em;
    height: 1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor; /* Ensure icons inherit button color */
    opacity: 1; /* Ensure icons are fully opaque */
}

/* View button specific styling */
.ldr-history-item-actions .ldr-view-btn {
    color: var(--accent-tertiary);
    border-color: var(--accent-tertiary);
}

.ldr-history-item-actions .ldr-view-btn:hover {
    background-color: rgba(64, 191, 255, 0.1);
    color: var(--accent-secondary);
}

/* Subscribe button specific styling */
.ldr-history-item-actions .ldr-subscribe-btn {
    color: var(--success-color);
    border-color: var(--success-color);
}

.ldr-history-item-actions .ldr-subscribe-btn:hover {
    background-color: rgba(10, 207, 151, 0.1);
    color: var(--success-color);
}

/* Delete button specific styling */
.ldr-history-item-actions .ldr-delete-item-btn {
    color: var(--error-color);
    border-color: var(--error-color);
}

.ldr-history-item-actions .ldr-delete-item-btn:hover {
    background-color: rgba(250, 92, 124, 0.1);
    color: var(--error-color);
}

/* Ensure btn-sm modifier works correctly */
.ldr-history-item-actions .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Fix button outline styles */
.ldr-history-item-actions .ldr-btn-outline {
    background-color: transparent;
    border-width: 1px;
    border-style: solid;
    color: var(--text-secondary); /* Ensure text/icons are visible */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .ldr-history-item-actions {
        gap: 0.25rem;
    }

    .ldr-history-item-actions button,
    .ldr-history-item-actions .btn {
        padding: 0.375rem 0.5rem;
        min-height: 36px; /* Slightly larger for mobile touch targets */
    }

    /* Hide button text on mobile, show only icons */
    .ldr-history-item-actions button span,
    .ldr-history-item-actions .btn span {
        display: none;
    }

    .ldr-history-item-actions button i,
    .ldr-history-item-actions .btn i {
        margin: 0;
    }
}
